package com.qfedu.knowledge.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qfedu.knowledge.dao.UserDao;
import com.qfedu.knowledge.entity.bo.UserBO;
import com.qfedu.knowledge.entity.dto.BasePageDTO;
import com.qfedu.knowledge.entity.vo.PageResult;
import com.qfedu.knowledge.entity.vo.UserVO;
import com.qfedu.knowledge.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName UserServiceImpl
 * @Author ykx
 * @Date 2024/4/26 23:32
 * @Version 1.0
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserDao, UserBO> implements IUserService {

    @Autowired
    private UserDao userDao;

    @Override
    public PageResult<UserVO> getUserList(BasePageDTO basePageDTO) {
        PageHelper.startPage(basePageDTO.getPage(), basePageDTO.getSize());
        return new PageResult<>(new PageInfo<>(userDao.getUserList()));
    }
}
